package com.sporch.controller;

import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Component
@EnableScheduling
public class ActivitiController {
    @Scheduled(cron="0/5 * * * * ?")    // 20秒执行一次
    public void scheduler() {
        System.out.println("定时任务执行了");
    }
}
